/**
 * projectName: waste_recovery-version_management
 * fileName: Copy.java
 * packageName: com.damie.uilt
 * date: 2021-01-23 10:26 上午
 * copyright(c) 2017-2020 xxx公司
 */
package com.damie.uilt;

import org.springframework.beans.BeanUtils;

/**
 * @version: V1.0
 * @author: light
 * @className: Copy
 * @packageName: com.damie.uilt
 * @description:
 * @data: 2021-01-23 10:26 上午
 **/
public class Copy {
    public static Object copy(Object t,Object s){
        Class<?> aClass = s.getClass();
        try {
            Object o = aClass.newInstance();
            BeanUtils.copyProperties(t,o);
            return o;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
